package face.pay.dao;

import face.pay.entity.TerminalTargetAllCount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Classname TerminalTargetOnCountDao
 * @Description JJL
 * @Date 2019/10/24 13:41
 */
@Mapper
public interface TerminalTargetAllCountDao {

    /**
     * 统计商家所有设备支付人数
     * @param sn
     * @return
     */
    List<TerminalTargetAllCount> queryMchAllTarget(@Param("userId")Integer userId,
                                                   @Param("oemId")Integer oemId,
                                                   @Param("sn")String sn);

    /**
     * 统计代理商下的所有商家设备支付人数
     * @param mchUserName
     * @return
     */
    List<TerminalTargetAllCount> queryAgencyAllTarget(@Param("agencyId")Integer agencyId,
                                                      @Param("oemId")Integer oemId,
                                                      @Param("mchUserName")String mchUserName,
                                                      @Param("sn") String sn);

    public  void truncateTargetAllTable();

    public void updateTargetAllCount();

    public String lastRunTime();

}
